package com.lwh.easyExcel.excelModel;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;
import com.lwh.easyExcel.entity.BdCheliangEntity;
import org.apache.commons.lang3.StringUtils;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;


public class CheliangListener extends AnalysisEventListener<BdCheliangEntity> implements Serializable{
	
	private String numRegex="^\\d+(.\\d+)?$";
    private boolean flag = true;
    private StringBuilder nullMes = new StringBuilder();
    private StringBuilder errorMes = new StringBuilder();
    private List<BdCheliangEntity> datas = new ArrayList<BdCheliangEntity>();
    
    @Override
	public void invoke(BdCheliangEntity info, AnalysisContext context) {


		datas.add(info);
	}

	@Override
	public void doAfterAllAnalysed(AnalysisContext analysisContext) {

	}

	public String getNumRegex() {
		return numRegex;
	}

	public void setNumRegex(String numRegex) {
		this.numRegex = numRegex;
	}

	public boolean isFlag() {
		return flag;
	}

	public void setFlag(boolean flag) {
		this.flag = flag;
	}

	public StringBuilder getNullMes() {
		return nullMes;
	}

	public void setNullMes(StringBuilder nullMes) {
		this.nullMes = nullMes;
	}

	public StringBuilder getErrorMes() {
		return errorMes;
	}

	public void setErrorMes(StringBuilder errorMes) {
		this.errorMes = errorMes;
	}

	public List<BdCheliangEntity> getDatas() {
		return datas;
	}

	public void setDatas(List<BdCheliangEntity> datas) {
		this.datas = datas;
	}
}